<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:user="http://ionrock.org/ns/wsgiappclient/user"
                xmlns:ac="http://ionrock.org/ns/app-client"
                xmlns:dyn="http://exslt.org/dynamic"
                xmlns:f="http://xmlns.4suite.org/ext" 
                xmlns:xh="http://www.w3.org/1999/xhtml"
                xmlns:ion="http://ionrock.org/ns/http-document"
                xmlns:exsl="http://exslt.org/common"
                xmlns:str="http://exslt.org/strings"
                xmlns:func="http://exslt.org/functions"
                xmlns="http://www.w3.org/1999/xhtml"
                extension-element-prefixes="dyn f ion func"
                exclude-result-prefixes="ac xh str #default dyn f ion">

  <xsl:output method="html" omit-xml-declaration="yes" indent="yes" />

  <!-- standard -->
  <xsl:param name="ac:flash" />
  <xsl:param name="ac:base_url" />

  <!-- extras -->
  <xsl:param name="ac:redirect_url" />

  <xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Atom Publishing Protocol Client</title>
    <xsl:variable name="css" select="f:resolve-url($ac:base_url, 'static/css/styles.css')" />
    <link rel="stylesheet" type="text/css" href="{$css}" />
  </head>
  <body>
    <div id="content-block">
      <div id="header-block">
        <h4>WSGIAppClient</h4>
        <div class="subheading">An Atom Publishing Protocol Client</div>
        <div class="breadcrumbs">
          <a href=".">home</a>
        </div>
      </div>
      <div id="body-block">
        <xsl:if test="$ac:flash">
          <div class="flash-message">
            <xsl:value-of select="$ac:flash" />
          </div>
        </xsl:if>
        <div class="login_forms">
          <fieldset class="user-collection">
            <legend>Login / Create Account</legend>
            <xsl:call-template name="sr-openid-forms" />
          </fieldset>
        </div>
      </div>
    </div>
  </body>
</html>
  </xsl:template>

  <xsl:template name="sr-openid-forms">
    <form id="openid-login" method="get" 
          action="http://sonicradar.com/service/gatekeeper/login?" target="_top">
      <input id="openid-text" type="text" name="uname" class="single-input" maxlength="255"
             value="Authenticate w/ OpenID"
             onclick="if (this.value == 'Authenticate w/ OpenID') this.value = ''; return true;"
             onblur="if (this.value == '') this.value = 'Authenticate w/ OpenID'; return true;" />
      <input type="hidden" name="return_location" value="{$ac:redirect_url}" />
      <input id="openid-submit" class="single-input-submit" type="submit" value="Login" />
    </form>
  </xsl:template>
</xsl:stylesheet>